<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/11 011
 * Time: 9:23
 */
namespace App\Pizza;

abstract class PizzaStore
{
    public $factory;

    public function __construct()
    {
        $this->factory = new SimplePizzaFactory();
    }

    public function orderPizza($type)
    {
        $pizza = $this->createPizza($type);

        $pizza->prepare();
        $pizza->bake();
        $pizza->cute();
        $pizza->box();

        return $pizza;
    }

    protected abstract function createPizza($type);
}